<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="x" uri="/WEB-INF/tags/coretag.tld" %>
<%@ taglib prefix="u" tagdir="/WEB-INF/tags" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <%@ include file="/WEB-INF/include/include.jsp" %>
  </head>
  <body> 
  <div id="toolbarWrap"></div>
  <div id="formWrap"></div>
  <div id="testText"></div>
  <div id="interestWrap"></div>
  <div id="sexWrap"></div>
  <div id="colorWrap"></div>
  <div id="sliderWrap"></div>
  <div id="windowWrap"></div> 
  <script type="text/javascript">
  	function aaa(){
  		alert(1);
  	}
  	function mycheck(obj){
  		obj.setRawValue(!obj.getRawValue());
  	}
  	
  	function getInterest(){
  		var v = Ext.getCmp("interest").getValue();
  		alert(v);
  	}
  	function getSex(){
  	  		var v = Ext.getCmp("sexgroup").getValue();
  		alert(v);
  	}
  	function selectColor(picker, selColor){
  		alert(selColor);
  	}
  </script>
  
  <u:page>
  
  	<u:toolbar renderTo="toolbarWrap">
  		<x:items>
  			<u:button text="新增" handler="aaa"  ></u:button>
  			<u:button text="删除"></u:button>
  			<u:button text="保存"></u:button>
  		</x:items>
  	</u:toolbar>
	<u:formPanel renderTo="formWrap">
		<x:items>
			<u:formPanel.text size="50" id="username"  value="admin" fieldLabel="用户名" 
			labelAlign="right" ></u:formPanel.text>
			<u:formPanel.text  allowBlank="false" blankText="dddd" id="password" fieldLabel="密码" inputType="password"></u:formPanel.text>
			<u:formPanel.textarea id="mydesc" fieldLabel="描述"  ></u:formPanel.textarea>
			<u:formPanel.hidden id="id" value="001" config="true"></u:formPanel.hidden>
			<u:formPanel.checkbox id="sex" checked="true" boxLabel="男"  ></u:formPanel.checkbox>
			<u:formPanel.date id="birthday" fieldLabel="生日" value="2012-01-20"  maxValue="2012-01-20" ></u:formPanel.date>
			<u:formPanel.display id="display" fieldLabel="名称" value="张三"  ></u:formPanel.display>
			<u:formPanel.file id="display" fieldLabel="文件" value="d://"></u:formPanel.file>
			<u:formPanel.htmleditor id="html" fieldLabel="详细"></u:formPanel.htmleditor>
			<u:formPanel.number id="age" fieldLabel="年龄" value="30" ></u:formPanel.number>
			<u:formPanel.radio id="dd" boxLabel="单选测试" ></u:formPanel.radio>
			<u:formPanel.time id="mtime" fieldLabel="时间"   ></u:formPanel.time>
			<u:formPanel.checkboxgroup id="interest" fieldLabel="兴趣爱好"  >
				<x:items>
				<u:formPanel.checkbox boxLabel="看书" inputValue="1" name="interestItem"  ></u:formPanel.checkbox>
				<u:formPanel.checkbox boxLabel="游泳" inputValue="2" name="swim" ></u:formPanel.checkbox>
				<u:formPanel.checkbox boxLabel="看电影" inputValue="3" name="interestItem" ></u:formPanel.checkbox>
				</x:items>
			</u:formPanel.checkboxgroup>
			<u:formPanel.radiogroup  id="sexgroup"  fieldLabel="选择性别">
				<x:items>
				<u:formPanel.radio boxLabel="男" inputValue="0" name="sexitem" ></u:formPanel.radio>
				<u:formPanel.radio boxLabel="女" inputValue="1" name="sexitem" ></u:formPanel.radio>
				</x:items>
			</u:formPanel.radiogroup>
			<u:formPanel.fieldcontainer fieldLabel="其他">
				<x:items>
				<u:formPanel.text id="account" fieldLabel="开户帐号" ></u:formPanel.text>
				<u:formPanel.text id="adress" fieldLabel="帐号地址" ></u:formPanel.text>
				</x:items>
			</u:formPanel.fieldcontainer>
			<u:formPanel.fieldset title="其他">
				<x:items>
				<u:formPanel.text id="tel" fieldLabel="电话" ></u:formPanel.text>
				<u:formPanel.text id="mail" fieldLabel="电子邮箱" ></u:formPanel.text>
				</x:items>
			</u:formPanel.fieldset>
			<u:formPanel.comboxstatic    id="area" fieldLabel="区域" data="[['001','思明区'],['002','海沧区'],['003','集美区']]"></u:formPanel.comboxstatic>
			
		</x:items>
	</u:formPanel>
	
	<u:button text="兴趣爱好" handler="getInterest" renderTo="interestWrap"></u:button>
	<u:button text="性别" handler="getSex" renderTo="sexWrap"></u:button>
 	<u:colorpicker id="dcolor" renderTo="colorWrap" onselect="selectColor"></u:colorpicker>
 	<u:sliderfield id="per" width="200" maxValue="100" value="30" fieldLabel="当前值" renderTo="sliderWrap" ></u:sliderfield>
  
  	<u:window id="window" title="新的窗口" resizable="false" maximizable="true"   width="200" height="300" ></u:window>
  
  	<x:bottomScript>
  		Ext.getCmp("window").show();
  	</x:bottomScript>
  
  
  </u:page>
  
  </body>
</html>
